package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.TrainingMaterial;

import java.util.List;

/**
 * 培训材料服务层
 * Created by yangsy on 2016/11/24.
 * modified by lutinabo 2016/12/7
 */
public interface TrainingMaterialService {

    /**
     * 查询列表
     * @param bootstrapSearchBean
     * @return
     */
    JSONObject list(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 删除
     * @param trainingMaterialId
     * @return
     */
    int deleteByPrimaryKey(String[] trainingMaterialId);

    /**
     * 新增
     * @param record
     * @param uploadFiles 需要上传的文件
     * @param deletedFiles 需要删除的文件
     * @return
     */
    int insertSelective(TrainingMaterial record, String uploadFiles, String deletedFiles);

    /**
     * 根据id查询
     * @param trainingMaterialId
     * @return
     */
    TrainingMaterial selectByPrimaryKey(String trainingMaterialId);

    /**
     * 更新
     * @param record
     * @param uploadFiles 需要上传的文件
     * @param deletedFiles 需要删除的文件
     * @return
     */
    int updateByPrimaryKeySelective(TrainingMaterial record, String uploadFiles, String deletedFiles);

    /**
     * 根据培训材料名称收索
     * @param name
     * @return
     */
    List<TrainingMaterial> queryListByName(String name);

    /**
     * 判断培训材料名是否存在
     * @param materialName
     * @return
     */
    boolean isExitByName(String materialName);
}
